<!--
  @author tanbiao
  @since 2019-11-21 18:56:50
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--表格id与lay-filter属性一致，统一定义为zmn-table-->
<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead >
        <tr>
            <!--规定“ID”列置于第3列，居中显示-->
            <th lay-data="{field:'relateId', width:300, unresize:true, align:'center', hide:true}">主键ID</th>
            <th lay-data="{field:'cityName', width:300, unresize:true, align:'center'}">城市</th>
            <!--规定“名称/标题”列置于第4列，通常居左显示，字数较少可以居中显示-->
            <th lay-data="{field:'price', unresize:true, align:'center'}">销售价</th>
            <th lay-data="{field:'internalSettlementPrice', width:300, unresize:true, align:'center'}">内部价</th>
            <th lay-data="{field:'externalSettlementPrice', width:300, unresize:true, align:'center'}">外部价</th>
            <th lay-data="{field:'操作', unresize:true, align:'center', fixed:'right'}">操作</th>
            <!--其他规范
                值较大的数字列居右显示，并使用千分号；值较小的数字列可居中显示，
                金额列统一居右显示，默认精确到小数点后2位，并使用千分号，
                通常情况下，时间或日期列靠后放置(操作列前)，居中显示
                -->
        </tr>
    </thead>
    <tbody>
        <tr th:each="item:${items}">
            <td th:text="${item.relateId}">relateId</td>
            <td th:text="${item.cityName}">cityName</td>
            <td>
                <div style="text-align: right">
                    [[${item.priceStandard == 2 ? #numbers.formatDecimal(item.priceYuan,1,'COMMA',2,'POINT'): #numbers.formatDecimal(item.negotiableMinPriceYuan,1,'COMMA',2,'POINT') + '-' + #numbers.formatDecimal(item.negotiableMaxPriceYuan,1,'COMMA',2,'POINT')}]]
                </div>
            </td>
            <td>
                <div style="text-align: right">
                    [[${#numbers.formatDecimal(item.internalSettlementPriceYuan,1,'COMMA',2,'POINT')}]]
                </div>
            </td>
            <td>
                <div style="text-align: right">
                    [[${#numbers.formatDecimal(item.externalSettlementPriceYuan,1,'COMMA',2,'POINT')}]]
                </div>
            </td>
            <td>
                <a th:if="${#authPermit.checkPermit('/product/tariff/item/city/price/detail.action')}" th:lay-href="|/product/tariff/item/city/price/detail.action?relateId=${item.relateId}" style="color: #00a0e9" lay-text='修改城市价格'>修改&nbsp;&nbsp;</a>
                <a th:if="${#authPermit.checkPermit('/product/tariff/item/city/price/delete.action')}" lay-event="delete" style="color: #00a0e9">删除</a>
            </td>
        </tr>
    </tbody>
</table>
